package com.yangming.springboot.deepin.playTest;

import java.util.HashMap;
import java.util.UUID;

/**
 * @创建人 ym
 * @创建时间 2021/4/21 0021
 * @描述
 **/
public class hashMapTest {

    private final static HashMap<String, String> map = new HashMap<String, String>(2);

    public static void main(String[] args) throws InterruptedException{
        Thread t = new Thread(new Runnable() {
            @Override
            public void run() {
                for (int i=0; i < 10000 ;i++){
                    new Thread(new Runnable() {
                        @Override
                        public void run() {
                            map.put(UUID.randomUUID().toString(), "");
                        }
                    }, "ftf" + i).start();
                }
            }
        }, "ftf");
        t.start();
        t.join();
    }
}
